from ttzScrapyProject.items import UserItem

"""
用户信息为{'UserId': '50720089', 'Nickname': '游客50720089', 'UserGrade': '7', 'UserExp': '82', 'ExpTotal': '1410', 'GameAwardRatio': '10%', 'AvatarPath': 'http://image-material.coo456.com/user/1.jpg', 'UnReadMessageCount': None, 'CoinDiamond': '0', 'CoinBean': '6', 'CoinCristal': '0', 'CoinBeanDeposit': '0', 'VipCode': 'vipg', 'UserJoinCount': None, 'TodayNewGameCount': None, 'VipUserInfo': [], 'BeanExchangeStatus': False, 'SafeRatio': 66, 'BindIdentity': 'y', 'HelpBeanStatus': 'n', 'RegisterTime': '1579269603', 'NewUser': 'n', 'WagesStatus': 'n', 'SignIn': False, 'IsRefuse': True, 'FinancePwdCon': 0, 'FinancePwdStatus': 1, 'HeadimgIframe': 0, 'Background': 0, 'HeadimgPower': '1582559999', 'HeadimgIframePower': '1660838399', 'BackgroundPower': '1664726399', 'IsLuckWelfare': 0, 'IsActDrop': 0, 'GiveRatio': 0, 'IsAward28': 0, 'IsForge': True, 'IsSet': False, 'NoticeMsgID': False}
"""


def parseUserItemConvert(data):
    userItem = UserItem()
    userItem["userId"] = data["UserId"]
    userItem["nickname"] = data["Nickname"]
    userItem["coinBean"] = data["CoinBean"]
    return userItem
